<?php

/**
 * 兑换
 *
 * Created by PhpStorm.
 * User: evan
 * Date: 16/9/20
 * Time: 下午3:14
 */
class Trans extends MY_Api_Controller
{
    /**
     * 虚拟币兑换
     */
    public function index()
    {
        $uid    = $this->uid;
        $type   = (int)$this->input->get_post('type');
        $amount = (double)$this->input->get_post('amount');


        $this->load->service('finance/service_finance_trans');
        $data = $this->service_finance_trans->index($uid, $type, $amount);


        $this->json_output($data['data'], $data['status']);
    }
}